<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="org_table">
    <div class="searchBar">

        <div class="cnd1-2">
            <span class="label">机构名称</span>

            <div class="inputContainer">
                <input id="js_name" class="inputStyles" data-options="validType:'length[0,32]'"/>
            </div>
        </div>

        <div class="cnd1-2">
            <span class="label">组织机构代码</span>

            <div class="inputContainer">
                <input id="js_code" class="inputStyles"/>
            </div>
        </div>

        <div class="cnd1-8">
                <a class="searchButton" onclick="doSearch('${base}/org')">搜索</a>
        </div>
        <div class="top_fr">
            <a href="#" class="prev prevImg"
               onclick="prevPage($('#top_current_page'),'${base}/org',1,$('#org_table'),${obj.page},${obj.queryReturn.pageSum})"></a>
            <input id="top_current_page" class="centerInput" value="${obj.page}"/>/
            <input id="top_count_page" readonly="readonly" class="centerInput" value="${obj.queryReturn.pageSum}"/>
            <a href="#" class="next nextImg"
               onclick="nextPage($('#top_current_page'),'${base}/org',1,$('#org_table'),${obj.page},${obj.queryReturn.pageSum})"></a>
        </div>
    </div>

    <div>
        <table class="new_datagrid" id="org_dg" style="width:100%; height:auto;">
            <thead>
            <tr>
                <th width="10%">机构名称</th>
                <th width="10%">组织机构代码</th>
                <th width="15%">
                    <a class="new_btn new_btn_back" onclick="create('${base}/org')">新增</a>
                    <a class="new_btn new_btn_back" style="visibility: hidden" onclick="create('${base}/org')">新增</a>
                </th>
                <th width="5%"></th>
                <%--<th width="5%"></th>--%>
                <th width="40%"></th>
            </tr>
            </thead>
            <tbody>
            <c:forEach var="org" items="${obj.queryReturn.rows}" varStatus="index">
                <tr>
                    <td>${org.name}</td>
                    <td>${org.orgCode}</td>
                    <td>
                        <a class="new_btn edit_btn_back" onclick="modify('${base}/org',${org.id})">编辑</a>
                            <%--</td>--%>
                            <%--<td>--%>
                        <a class="new_btn edit_btn_back" onclick="details('${base}/org',${org.id})">详情</a>
                    </td>
                    <td>
                        <a class="delImg" onclick="delOrg('${base}/org',${org.id})"></a>
                    </td>
                    <td>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>

        <div class="fr">
            <a href="#" class="prev prevImg"
               onclick="prevPage($('#current_page'),'${base}/org',1,$('#org_table'),${obj.page},${obj.queryReturn.pageSum})"></a>
            <input id="current_page" class="centerInput" value="${obj.page}"/>/
            <input id="count_page" readonly="readonly" class="centerInput" value="${obj.queryReturn.pageSum}"/>
            <a href="#" class="next nextImg"
               onclick="nextPage($('#current_page'),'${base}/org',1,$('#org_table'),${obj.page},${obj.queryReturn.pageSum})"></a>
        </div>
    </div>
</div>
